package org.example.back.controller.healthytip;

import org.example.back.entity.healthytip.HealthyTip;
import org.example.back.service.healthytip.HealthyTipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/healthTips")
   
public class HealthyTipController {

    @Autowired
    private HealthyTipService healthyTipService;

    @GetMapping("/{id}")
    public HealthyTip getTipById(@PathVariable Integer id) {
        return healthyTipService.getHealthyTipById(id);
    }
}

